/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tp3_1;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.*;

/**
 *
 * @author aj48450
 */
public class Client
{
    private String ip;
    private int port;

    private Socket connectSocket;
    private PrintWriter out;
    private BufferedReader in;

    public Client ( )
    {

    }
    public Client ( String ip, int port )
    {
        try
        {
            connectSocket = new Socket(ip, port);
        }
        catch ( Exception z )
        {

        }
    }


    public void SendMsg ( String msg )
    {
        try
        {
           
            out = new PrintWriter (connectSocket.getOutputStream(), true /* autoFlush */);
            in = new BufferedReader( new InputStreamReader(connectSocket.getInputStream()));
            out.println(msg);
        }
        catch ( Exception e )
        {


        }
    }




}
